Systems and methods for the creation of software packages using layered systems

ABSTRACT

The inventions relate generally to computer systems having facilities for providing virtual portions of file systems and configuration setting to applications. More particularly, the inventions relate to methods of capturing software packages using layered computing systems and software package products produced by those methods. Detailed information on various example embodiments of the inventions are provided in the Detailed Description below, and the inventions are defined by the appended claims.

CROSS-REFERENCE TO RELATED APPLICATIONS

[0001] This application claims the benefit of U.S. ProvisionalApplication No. 60/387,969 filed Jun. 12, 2002 which is herebyincorporated by reference in its entirety.

BACKGROUND OF THE INVENTIONS

[0002] Prior computing systems have been susceptible to applicationconflicts with the host operating system (OS) and other applications.When an application is installed to an OS, a number of globallyaccessible files are often placed to the computing system, including forexample shared libraries and system configuration. Those sharedlibraries are often provided in different versions, with applicationsrequiring one version or another. A mismatch between a library versionand a version required by an application sometimes results in thatapplication crashing, becoming inoperable, or exhibiting other errors.Shared configuration elements are sometimes globally available toapplications, which may write a favored configuration thereto. Followinga write to that configuration other applications may be unable to readthe configuration properly, or may be unable to function under a newspecified configuration. Thus it is that following the installation ofan application to a computer, other applications may stop working.

[0003] Installing a number of applications to a computer can besomething of a black art. An administrator may, with good intentions andunderstanding, install several applications to a computer. Upon testingan installation or during use, the administrator or a user may discoverthat one or more applications operate errantly or not at all. It isusually not apparent which applications are in conflict. Theadministrator may enter a procedure in which applications areuninstalled from the computer in a process of elimination to find theoffending applications. Sometimes de-installation programs do not removeall installed files, in which that procedure may fail to locate theproblem. The administrator is then required to continue by creating aclean (or virgin) installation, and installing applications one at atime until the problem is located.

[0004] When applications are found to conflict, a choice must usually bemade as to which one will be installed. One of the applications issometimes installed to a different computer to avoid the conflict. Ifconflicting applications must be installed to a single computer, a newversion of at least one of the applications must be sought and purchasedfrom the software vendors. A non-conflicting version may not beavailable, especially if a vendor is small, not supporting theapplication, or no longer in business.

[0005] Snapshot utilities are available, which generally operate tocreate a database of all files and registry settings on a computer.Prior to installing an application, a snapshot is taken of the files andregistry settings. The application is then installed, and tested. If theapplication fails to work satisfactorily, the system can be restored bycomparing the existing files and registry settings against the snapshotand removing installed files and otherwise restoring the system asbefore. Snapshot utilities have several limitations. First, if a newlyinstalled application causes a prior installed application to fail, itis often not possible to simply revert to a snapshot made prior to olderapplication installation, especially if there have been otherapplications installed in the interim. The administrator may be requiredto revert back to the earlier snapshot, and then re-install theintervening applications and the new application. Additionally, thereare usually a limited number of snapshots that can be stored, and thus arequired snapshot may not have been retained when found to be needed.

[0006] Likewise, a system may be restored to an earlier state if backupshave been made. That restoration process, however, usually involves asignificant amount of time and destroys all data recorded to the systemafter the time of the backup.

[0007] Another method involves recording a series of changes (or“diffs”) to a buffer. Using that method a system can be restored back toa point in time by reverse application of the diffs to the file systemback to the selected point in time. That method typically requires afixed amount of disk space for the diff buffer, which becomesunavailable for regular use. As the buffer becomes full, the only way tocontinue to record diffs is to overwrite older diffs. Because of thislimitation, the method can only restore a system back to a date forwhich diffs remain available. In addition, this method requires threedisk operations per write request: one to read the existing diskinformation, one two write the diff, and one to write the originalrequest. This method is therefore processor and disk intensive.

[0008] The Microsoft Windows MET™ includes a feature called “SystemRestore”. That system is essentially a snapshot system, and only backsup files related to the OS and installed applications (not user files).

[0009] A current practice of maintaining computers is to image the harddrive of a computer while in a working state. If the computer becomesunstable, or if undesirable content appears on the computer, thecomputer's drive is restored using the earlier made image. This practiceis lacking in that all changes made following the image creation arewiped off the system when the computer is restored, including user filesand other applications.

[0010] Also, some applications are not provided with an uninstallprogram. To de-install those applications an administrator is requiredto know where the application files and settings reside in the system,and remove them manually.

[0011] It is therefore apparent that much time and money is expended inthe administration of applications on computing platforms, and thusthere is a need for a way to ease the installation and de-installationof applications, and prevent application conflicts.

BRIEF SUMMARY OF THE INVENTIONS

[0012] The inventions relate generally to computer systems havingfacilities for providing virtual portions of file systems andconfiguration settings to applications. More particularly, theinventions relate to computer systems that provide a layer organizationfor files and configuration settings that can be overlaid on top of anoperating system. Detailed information on various example embodiments ofthe inventions are provided in the Detailed Description below, and theinventions are defined by the appended claims.

BRIEF DESCRIPTION OF THE DRAWINGS

[0013]FIG. 1 illustrates components of a layering computer system at aconceptual level.

[0014]FIG. 2 illustrates an operation of a layering computer system at aconceptual level.

[0015]FIG. 3 illustrates components of a particular layering computersystem.

[0016]FIG. 4 illustrates components of a layering computer system atsimple organizational level.

[0017]FIG. 5 shows a simplified method for performing read file systemoperations using a layered computing system.

[0018]FIG. 6 shows a simplified method for performing write file systemoperations using a layered computing system.

[0019]FIG. 7 shows a simplified method for performing registryoperations using a layered computing system.

[0020] Reference will now be made in detail to some embodiments of theinventions, example of which are illustrated in the accompanyingdrawings.

DETAILED DESCRIPTION

[0021] General Concepts

[0022] For the purpose of simplifying the discussion herein, an examplecomputing device may be referenced. That device is a conventionalpersonal computer or workstation having a CPU, memory, display,keyboard, mouse, and at least one fixed disk. It will be apparent to oneof ordinary skill in the art that the concepts disclosed herein mayapply equally to other computing systems that are not personalcomputers, for example diskless workstations, headless workstations orservers, and embedded systems. Herein it is contemplated that theinventions may be applied to these and other computing systems, bothexisting and yet to be, using the methods and principles disclosedherein.

[0023] Likewise the discussion below speaks of Registries and registrysettings, which are specific to Microsoft Windows™ operating systems. Itwill be recognized that registry settings are merely configuration forthe operating system and applications installed to a computing device,accessible through a system-wide API. The meaning of registries andregistry settings is therefore extended to future Windows operatingsystems and operating systems other than Windows, where equivalentstructures and access facilities exist thereon.

[0024] In the discussion below, the words “enabled” and “activated” areused interchangeably to describe layers that are active or enabled on alayering computing system. Likewise, the words “disabled” and“deactivated” may be used to describe layers that are not enabled oractive.

[0025] Provided in one aspect of the invention are application layerswhich are isolated from other applications on a computer. In thataspect, an application layer may be defined to be a group of files incombination with any associated application configuration stored tooperating system files. An application of a layered system may be anapplication in the most commonly used meaning, such as word processors,browsers, system tools, games, and the like, or may extend to othersoftware installed to a host providing an environment, such as agraphical user environment or shell. It will be seen that isolatingapplication files and configuration in a layer provides severalbenefits, including the ability to delete, disable, and enableapplications in a simple way and to provide a barrier betweenapplications which may use conflicting configuration or library files.The use of a layering system may therefore enhance the stability,reliability, usability and security of a computing system.

[0026] A layered system introduces a new concept of organizing data fromdisparate sources and presenting a virtual view of that data to anoperating system and a user. This permits the real data to be much morelogically organized while still presenting to the operating system andthe user an expected view and access of that data. In a sense, a layeris a higher order storage unit. Because a layer can be managed as a unitfor the purposes of exporting, importing, enabling, disabling, and soon, a computer system and user data can be managed with a greater degreeof flexibility and reliability, also with improved security. As changesto a layered system are made, the changes are organized while beingwritten, rather than tracking the changes made. By doing this both aspeed penalty and the dedication of large amounts of storage for imagesand changes are avoided.

[0027] Depicted in FIG. 1 are components of a layering computer systemat a conceptual level. A base operating system 110 forms a platform withwhich applications can be run and files can be accessed in file systems.Base operating system 110 further has registry settings, globallyavailable to applications for reading and writing. The system haslibraries 108 for executing the functions of the operating systemincluding operating file systems and registries, and other operatingsystem functions. Tied into libraries 108 are layering system librariesand/or software 106 which intercept file system and registry accessesfrom applications 104. As accesses are received from applications 104,the layering system software 106 performs computations to determinewhether the accesses should be permitted to continue to the baseoperating system 110, or should be redirected to layer information 112,the information relating to and the contents of files and registrysettings. A layer manager application 100 may be provided to permitcontrol and configuration of the layering system software 106 through amanagement API and library 102.

[0028] Depicted in FIG. 2 is the operation of a layering computer systemat a conceptual level. An application 200 is running on a layeredcomputing system. This computing system contains a base file system 206,and two layers labeled “A” and “B”, 204 and 202 respectively. In thisexample layer B has priority over layer A, which in turn has priorityover the base file system. A first file access 208 is made byapplication 200. The layered computing system determines the owner ofthe file being accessed. Finding an entry for file access 208 in layerB, the corresponding file in layer B is opened and returned to theapplication. The file access of 208 might also correspond to files inlayers A or the base file system, however layer B is determined to bethe owner as it has priority over layer A and the base. Another fileaccess 210 is made by application 200. The computing system does not,however, find a corresponding entry in layer B. An entry is found inlayer A, which has priority over the base file system. Again, if a fileexisted in the base file system corresponding to the file access, itwould be accessed because layer A is found to be the owner withpriority. The computing system is not able to find corresponding entriesin layers A or B for file access 212, so that access is made to the basefile system.

[0029] In FIG. 4 components of a layering computer system at simpleorganizational level are shown. A computing device includes a processor400, which may also have peripheral devices attached such as memory,input devices or output devices as desired. Processor 400 interacts withone or more storage devices 402, providing storage for the processor. Onstorage 402 is a base operating system 408 and applications 410. Anumber of layers 404 a-n are also contained on storage 402, each havingapplications 406 a-n.

[0030] In larger aspects, a layer may be defined to be a set of filesystem and registry changes, that combination forming an organizationalunit that may be managed by layered system software. In some cases, alayer need not contain registry changes, but only changes to one or morefile systems. In those cases it may be desirable to limit support in thelayered system software to files of file systems. A layer definition mayinclude layer properties and settings, layer inclusive files, referencesto those files, registry settings and locations, and a manifest ordirectory those file and registry references.

[0031] References may be made inherent, if desired, by locating filesand registry settings in a structure that mirrors a real underlying filesystem. Such a mirroring system may be organized in a common directory,with one subdirectory per defined layer, each containing a mirroreddirectory structure of the underlying file system.

[0032] An exported layer will contain all of the layer-includedinformation bundled in a transportable archive. Exported layers may befurther bundled into groups, which is especially useful for layers thatrely on other layers, such as layers of a hierarchy or peer layers. Forsystems that utilize a mirror structure of an underlying file system, itmay be desirable to hide the mirror structure from applications, exceptperhaps a manager application, so as to prevent accidental datamodification, loss, or meddling.

[0033] A layer intending to isolate an application has stored thereonthe files and directory structure of the application's installation.When that layer becomes mounted (or enabled), those application filesand directories are shadowed or overlaid over the regular operatingsystem file system. Shared libraries (such as DLLs), system accessibleconfiguration (such as registry entries), and version control aremanaged by the layering subsystem, optionally using an internaldatabase. Though each layer is a separate and individual entity withinthe host OS, the application files, data, and system accessibleconfiguration are presented as if they resided in their respectiveordinary locations. Thus an application stored in a layer appears to thehost OS as if it were installed in the ordinary fashion with theexpected functionality.

[0034] For example, suppose a layer existed in a Windows OS environmentthat specified that in C:\windows there should be a file calledwinfile.exe. Suppose that this file did not reside in the realC:\windows directory. When the layer is not active, a file listing ofC:\windows does not show a winfile.exe. When the layer becomes active,the layering system merges (or overlays) the real listing of C:\windowsand the file list described in the layer. In this example, applications(and thereby a user) would see all of the files in the real C:\windowsdirectory and winfile.exe. Registry values in a layer may be handled ina similar manner.

[0035] Shown in FIG. 5 is a simple method for performing read filesystem operations using a layered computing system. A loop is enteredbeginning at step 500. Execution halts in step 502 pending the receiptof a read request. A determination is then made in step 504 as towhether or not the file reference of the request is maintained in anenabled layer. To perform that determination all the layers on thesystem are generally examined for a virtual file corresponding to thefile reference of the request. If no enabled layer contains such avirtual file, step 506 executes in which the usual read operation isexecuted using the file reference of the request. Otherwise, an ownerlayer is identified in step 508. For example, if two enabled layerscontain a virtual reference to a file, one will take priority over theother and be identified as the owner layer. Step 510 then executes, inwhich a virtual file reference is determined that corresponds to thefile reference of the read request. That virtual file reference might bean offset and length for a storage device in some systems, a pathname ata mirrored location in other systems, or other reference. Afterward, theread operation is executed using that virtual file reference in step512.

[0036]FIG. 6 shows a simple method for performing write file systemoperations using a layered computing system. A loop is entered beginningat step 600. Execution halts in step 602 pending the receipt of a writerequest. A determination is then made in step 604 as to whether or notthe file reference of the request should be captured to an enabledlayer. That determination may be made, for example, by noting the stateof the system software is in a capture state, and in some circumstancesby noting the PID of the calling application and parents. If no enabledlayer is configured for capture, step 606 executes in which the usualwrite operation is executed using the file reference of the request.Otherwise, a capture layer is identified in step 608. Step 610 thenexecutes, in which a virtual file reference is determined thatcorresponds to the file reference of the write request. That virtualfile reference might be an offset and length for an unused portion of astorage device in some systems, a pathname at a mirrored location inother systems, or other reference. Afterward, the write operation isexecuted using that virtual file reference in step 612.

[0037] The read and write operations spoken of in the discussion ofFIGS. 5 and 6 may be performed on some systems through an open( ) call.A read request, for example, might be a call to open( ) with a pathnameas a file reference and “r” as an option. Likewise, a write requestmight be a call to open with “w” or “+” as an option. In either case, afile handle is returned which would correspond either to a true filereference (if the file reference is not managed in a layer) or to avirtual file reference (if the file reference is managed in at least onelayer). That file handle will continue to be used in data read and writeoperations, and thus the data will be delivered to and from the correctsystem locations. Other systems may use other equivalent methods ofopening, reading and writing, and applicable using the methods describedherein.

[0038]FIG. 7 shows a simple method for performing registry operationsusing a layered computing system. The method begins at step 700,following which a pause is executed at step 702 until a request forregistry setting operation is received. When a registry setting requestis received, step 704 executes in which a determination is made as towhether or not the request is to be captured to an enabled layer. Ifnot, step 706 is executed in which a usual registry function is called,as if layering were not present in the system. Otherwise, step 708 isperformed, in which a destination layer is identified. Step 710 teststhe request for a registry entry creation request. If a creation requestwas received, step 712 executes in which a virtual registry entry iscreated in the destination layer. Otherwise step 714 is performed,testing for a registry entry deletion request. If positive, step 716 isexecuted in which either a virtual registry entry is deleted, if theentry exists in a single layer, or a delete entry is made in the virtualregistry of the destination layer signifying that the registry entryshould not appear while that layer is enabled. If the request is neithera create or delete request, step 718 is performed testing for a setregistry entry request. If positive, step 720 executes creating avirtual setting in the destination layer.

[0039] As in the above example, layers may contain file and registrydeletion references. Those references may be used where a layerspecifies the absence of a file or registry setting, whereby a specifiedfile or registry setting will appear to be absent from the computingsystem only when the layer is enabled.

[0040] The use of a layering system provides several advantages. Ifapplications are stored individually in layers, interactions betweenapplication files may no longer occur due to conflicting sharedlibraries (DLLs), as each application ‘sees’ only it's own installedlibraries first, followed by libraries in the base operating system,those base libraries optionally preceeded by libraries from other layersif desired. Applications captured in a layer may be safely andcompletely uninstalled by simply removing the layer from the hostcomputing system. Different versions of an application may be stored aslayers on a single computer; the user may select a desired version byenabling the particular layer. A layering system may also extend thefile systems of the OS beyond physical limits if layers are stored onseparate disk partitions or remote file systems. If layering is used fora group of installed applications, the computing system may be restoredto a “virgin” or checkpoint state by removing one or a group ofapplication layers. The transfer of applications between similarcomputing systems can be simplified, in that the transfer may be donesimply by moving the layer containing the application. The bundling ofan application and user files into a layer provides a package that maybe compressed or encrypted and transported conveniently. Using alayering system application vendors can provide ‘pre-installed’applications as layers on CD-ROM or other media, those applicationsbeing pre-tested and guaranteed to work with a high reliability. A layeralso provides a convenient container to limit access to an application,for example for time limited use or license key access.

[0041] In preferred systems, the enablement and disablement of layers isperformed through a system call. The system drivers control the accessof applications to the file system through the enabled layers, generallywithout requiring significant access to the system disk or otherstorage. In those systems the installation and de-installation of anapplication can be as simple as enabling or disabling a containinglayer, without requiring the installation or removal of the applicationsfiles from a hard disk. In those systems, time consuming snapshotutilities become unnecessary.

[0042] In a preferred system, layering only applies to files located tofixed disks and network drives, each layer spanning one or more fixeddisks. In those systems removable disks should not generally be layered,as a layer generally pertains to the persistent files and configurationrequired to operate an application or user environment. It is expectedthat under most circumstances user files should be permitted to be savedto a floppy disk or CD-RW, for example, so a user can transport hisfiles to another computer. Likewise, areas on a fixed disk may also bereserved for user or other files to be excluded from layering, forexample a “my documents” directory, as desired.

[0043] In some systems it will be advantageous to distinguish layersinto a “read-only” and “read-writable” portions, the read-only portioncontaining files and configuration as originally installed and theread-writable portion containing additions, deletions and modificationsto the original installation. In some circumstances these layers may bereferred to as the install portion (read-only) and the user (read-write)section. A read-writable portion may be global to all users of acomputer. Alternatively a read-writable portion may be provided for eachuser of a computer, each read-writable portion being protected fromaccess by other users.

[0044] Some systems provide a multi-user environment providing afacility for an administrator to designate layers accessible toindividual users and another facility to automatically enable layers onuser login and disable layers after a user has logged off. In thosesystems an administrator may provide layers accessible to all users orsome users. Other layers may be provided accessible only to anindividual user. In a subset of those systems a writable layer isprovided for each user, providing data protection and isolation betweenusers.

[0045] A single layer having a read-only and a read-writable portion isequivalent to two layers, one of which is write protected. In alternatesystems, read-only and read-writable layer portions are individual peerlayers; those layer definitions containing a reference to theaccompanying peer layer.

[0046] In layered systems layers may be stacked on top of each other,with the real file system at the bottom of the stack. If files of thesame name and location exist in multiple layers, or in the base filesystem, rules can be provided whereby the layered system can determinewhich file to present to an application. In some systems, layers includedependency information. That dependency information may include a listof layer identifiers which are required to be enabled when a particularlayer is enabled. Dependencies may be asserted when a layer is created,by recording the layers enabled on a layered system at the time of layercreation. The layering system software may automatically enable alldependent layers when a particular layer is enabled.

[0047] For ease of configuring and managing a layering system, a managerapplication may be provided. The manager application permits anadministrator or user to control the presentation of applications anddata on a system, as well as other functions. A manager application mayhave facilities for importing and exporting layers, using a standardlayer archive format. That archive format will advantageously becompressed, and may use standard archiving formats, for example thoseused by ‘zip’ or ‘tar’ type applications. A manager application providesa logical place to contain a facility for changing layered systemsoftware settings. A manager application might provide a viewer to viewinformation about a layer. Likewise, a layer editor may be provided toedit certain layer information as desired. An editor might also beprovided whereby registry settings and files can be added, removed, orchanged in a layer. A facility for selecting, enabling, and disablinglayers and layer groups may also be provided. Likewise, a facility fordefining and editing layer groups may be included, as well as layerdependency information. A facility for deleting and installing layersmay also be provided in that manager application. That application mayalso include an interface to cause layered system software to enter andexit capture modes.

[0048] It may also be desirable to provide a startup layer enablementfunction, whereby the computing system starts up a group of layers basedon layer configuration. This will be especially helpful where it isdesired not to provide users with non-layered access to the underlyingfile system and registry, for example in public settings.

[0049] It may optionally be desired to include variable handling withregard to file system paths and registry paths. The location of a fileor registry setting specified in a layer may include one or morevariables, so as to permit relocation of that object. A variable may bedenoted in many ways, for example by surrounding the variable name withpercent “%” characters. The source of some variable names and values maybe from the environment. For example, Windows operating systems set the“WINDIR” environment variable to the location of the OS system subtree,for example C:\windows. Including the WINDIR variable in a path maypermit files of a layer to be moved from one Windows system to another,especially if the OS system subtree resides in different locations onthe computers. Other variable values may be supplied at runtime, forexample a “CURRENTUSER” variable. In that example, the CURRENTUSERvariable is set to a user's login name while that user is logged in. Oneuse of the CURRENTUSER variable is to provide a layered file referencefor a global file that appears in each user's profile directory. Yetother variable names and values may be stored in a layer definition. Amanager application may provide editing facilities for changing thoselayer-defined variables, and for editing the pathnames of virtual files.

[0050] Layer Creation Modes

[0051] Layer creation modes may be provided in a layered system tocreate new layers through a “capture” operation. A capture operation isgenerally started and ended, and uses the layering software to interceptoperations that install, delete, rename or modify files andconfiguration such as a registry. If the layering system supports layershaving both a readable and read-writable portion, the capture operationmay record changes to the readable portion; that readable portionbecoming effectively locked when the capture operation is ended. Duringthe capture operation changes made by the installation procedure do notaffect the base system, but are rather recorded to the new layer.

[0052] A first layer creation mode is simply called “capture” mode. Whenthat mode is enabled, all operations by any application to create,modify or delete files are entered into a layer. This mode is especiallyhelpful in situations where it is desirable to create a new layer forone or more applications to be installed to the computing system. In anexample of a capture mode operation on a Windows platform, a user firstenables capture mode. The user then executes an application installationprogram. During the install, all of the applications shared DLLs,registry entries, and .ini files that would be directed to the Windowssystem directories become trapped in the capture layer. Applicationfiles that would be placed on file systems managed by the OS are alsoredirected into the layer. All of the captured data is held separatefrom the regular OS either locally or remotely in a data file, hard diskpartition, or some other container.

[0053] A second layer creation mode is referred to as “capture by PID”mode. That mode is similar to “capture” mode, with the difference beingthat only changes made by a particular process ID (PID) or one of itschild PIDs are captured.

[0054] A third layer creation mode is called “delete capture” mode. Thismode may be thought of as the inverse of “capture” mode. Delete capturemode is intended to track all of the file system and registry deletionsthat occur and place those files and registry entries into a new layer.The software (driver) is hooked into the system so that operations thatdelete, rename, or modify file system or registry so they can be copiedto the capture layer before they are modified. This mode may beparticularly helpful to create a layer of an already installedapplication. The user enters “delete capture” mode, following which theuser activates the application's deinstallation program. As theapplication's uninstall program removes files and registry settings,they are copied to the new layer. When the uninstall is complete, theuser exists delete capture mode. At that time the application does notexist in the regular file system or registry, but can be activated bythe user as it appeared before the uninstall operation by activating thenewly created layer.

[0055] A fourth layer creation mode is called “delete capture PID” mode.That mode operates in similar fashion to delete capture mode, with thedifference that only changes made by a particular PID and child PIDs aretracked, rather than system-wide changes.

[0056] A system supporting layering need not implement a capture mode ifan alternate layer delivery mechanism is provided, for example a layerimport operation or a simple file or file system copy.

[0057] Use: Application Installation Generator

[0058] Many application installer programs have the ability to create anapplication install via a “capture” or “snapshot” process. This processtypically involves comparing the state of the computer system before andafter an application install and generating the install informationbased on the differences. In a system supporting layers, an applicationmay be captured as outlined above, creating an installation layer.Because changes are tracked as they occur, no state comparison needs tobe done, saving time. In addition, it is usually recommended that the“capture” operation be performed on a “clean” or “virgin” system, so thecapture process can capture all the necessary system changes (i.e. won'tmiss changes due to application pieces being left over from priorinstallations.) This requires the user to reinstall the operating systemto get the system into the desired clean state. A layered system may bemade clean by disabling all layers created during installation captureprocedures (assuming all install operations have occurred under captureoperations.) After capture of an installation layer, that layer can beused to install the application at another computer supporting layers,or the information can be extracted from the layer to provide a filemanifest for other installation programs.

[0059] Use: Software Installation/Uninstallation

[0060] Layers can be advantageously used to provide an installation foran application that is relatively easy to uninstall. A software vendorbuilds an application CD (or other media), first using a capture mode torecord a layer of the application installation. That layer is thenexported to a file, which file is then combined with an installationprogram for the layering system software, for example to a compact disc.The compact disc will contain an installation program, which for examplemight be called ‘setup’. The setup program operates first to install thelayering system software, and then import the layer exported to thecompact disc into the destination system. At that point, the subjectapplication is then installed to the destination system, but isolated ina layer. Because it is isolated, it is protected from corruption fromother applications or meddling, and thus it remains in a known andreliable state, potentially reducing the number of technical supportcalls.

[0061] It is probably desirable to include a banner screen advertisingthe layering system software product and providing contact informationfor product inquiry and support. It may also be desirable to include alayer manager application with the layering system software to allow auser to enable and disable the application layers or other installedlayers, but that is not necessary for a simple demonstration product.

[0062] As the application is used, it may be desired to record changesto the virtual file system into the writable portion of a layer.Alternatively, it may be desirable to record some user files to theunderlying file system so those files could be retained if theapplication layer was deinstalled or removed, as might be the case forword processing files, CAD files, etc. The software installer may begiven the option to record the software installation of an applicationlayer into a readable-only portion, so the user cannot inadvertently orotherwise damage the application installation.

[0063] At some point, it may be desired to remove the application. To doso, the user removes the layer from his computer, which deinstalls theapplication and any files or changes made to the virtual file system.Uninstalling the layering system software is optional, as the presenceof that software would not adversely affect the use of the destinationsystem.

[0064] Through that method, software creators may create a demo versionof their software. These versions might be used to give the end userexperience with a software product before a purchase is made. Theadvantage of removing changes to the virtual file system is significant,as many applications do not uninstall cleanly and leave residual filesand changes.

[0065] Optionally, functionality might be built into the layering systemsoftware that disables the application layer after a period of time.After such a disabling, a user would have the option of removing theapplication layer, or purchasing a license for use of the application.The license would presumably be accompanied with a license key or otherauthentication feature verifiable by the layering system software.

[0066] In another alternative configuration, an application layer isnever transferred to a resident fixed disk, but rather remains residenton the vendor product, compact disc or otherwise. In that configurationthe application layer can only be activated if the vendor product isreadable in a media drive, and little or no space is taken on residentfile systems for the application installation.

[0067] Use: Secure Applications

[0068] Applications can be protected from unauthorized access throughthe use of a layered system. In a first situation, it is desired toprotect application files from viewing and copying, for which onesolution is described. The layering system software of a suitable systemhas an additional feature by which a layer may include an authenticationkey or token. Any application of the computing system desiring to openfiles within the layer must supply a token to the layering systemsoftware before access is allowed. The PID of an authenticatingapplication may be tracked so that only one authentication step isrequired. The application layer may additionally be encrypted, thelayering system software performing decryption and encryption steps atruntime as the application layer is accessed. That system isadvantageous in that only the data of a particular application need beencrypted, reducing the complexities of bootstrapping into an encryptedfile system and modifying system applications to support encryptedsystem files.

[0069] In that system authenticating applications will have access tothe application files, but not applications not having a validauthentication token. The authenticating applications can be constructedsuch that limited access is permitted to the application files, asdesired by the programmer. For example, an application may store alicense key to one of the application's files. If access were permittedto that file, an unscrupulous user could copy that license key to asecond computer providing illicit access to the application softwarestored thereon. The authenticating layered system software is installedto the computer, and an application layer is constructed and installedto the computer, that layer encrypted using a key constructed withinformation specific to the computer, for example a volume label orEthernet MAC address. A second application installed to the computer,for example Windows Explorer, cannot view the application layer filesbecause it does not possess the correct authentication key. A user istherefore prevented from copying or otherwise accessing the applicationfiles, providing security for the software vendor.

[0070] In a second situation, it is desirable to protect the softwarefrom execution by unauthorized individuals. In that system, the layeringsystem software has a facility for authenticating a user before enablinga layer.

[0071] Use: Secure Base OS

[0072] In some circumstances it is desirable to regularly restore acomputer to a ‘virgin’ state. This is sometimes done, for example, byInternet cafes and college computer laboratories, or other systemstypically used by untrusted users. The computers are regularly revertedback to a known good state to ensure that users have a stable andworking system free viruses and from potential interference and securityrisks. The computer restoration is often performed by writing an imagecontaining all files of the computer to the computer's hard drive madeearlier. A layered computing system can serve better.

[0073] To use a layered computing system in a first system protectionand restoration mode, an administrator first installs a base OS andapplications to a computer. The administrator then causes the computerto enter a capture mode, by which all further changes are recorded to alayer and not to the underlying file systems and OS resources. Users maythen use the computer in an unrestricted fashion, including installingapplications, using the Internet, and even passing (inadvertently)viruses to the computers. At the end of the day (or other period), theadministrator ends the capture mode, deletes the layer, and re-enterscapture mode. All changes made by users are then wiped and the computeris restored to its base state.

[0074] A second system protection and restoration mode provides thatuser data may be retained between sessions. To use this mode, anadministrator first installs a base OS and applications to a computer.The administrator then sets up the computer such that when a user logsin (or otherwise starts a user session), a user layer is enabled. Whilein a user session, changes are recorded to that user's layer. When theuser logs out, the user layer is disabled and retained for future use.That layer may be used repeatedly for multiple user sessions, the stateof the user's files and configuration being maintained between sessions.Applications specific to a user might be installed to a user layerproviding an easy way to control what applications are available to aparticular user.

[0075] If desired, a user layer may be stored to a network server andretrieved and stored as required to any computer of a computer farm, sothe user may access his files and state anywhere in the computer group.That layer may provide files and directories overlaid on the existingfixed disk file systems, as opposed to locations referencing new networkmount points. On a Windows directory structure files located to a layermight appear under C:, as opposed to being presented as a new andseparate volume (e.g., D:).

[0076] Alternatively, a layer might be configured to store filespresented as a virtual volume. For example, a user might store his datain a virtual volume accessible under P:, and backup his user data bybacking up the user layer. That layer could also be protected usingencryption and authentication by including appropriate facilities in thelayered system software. In a variation on that system, a layer might beconfigured to present files in a subdirectory on an existing volumewhich could be at any level in a file system hierarchy.

[0077] A layering system might also be used to provide a “bottomless”virtual storage device. In that system an auxiliary storage device ispresented by layering system software as being available on a main localstorage device (e.g. C:). The auxiliary storage device might be anadditional local fixed disk, network drive or file system, or otherstorage resource. The auxiliary storage device space is effectivelyadded to the existing space, providing a way to expand an existing fixeddisk that has become filled. The auxiliary storage device may optionallybe hidden to the system. This system is advantageous in that norepartitioning is required, no backup and restore option is required,and no uninstall/reinstall operation of applications is required.

[0078] Use: Heirarchical Layers

[0079] Multiple layers can advantageously be used. In one layerheirarchy, one layer represents a user type and a writable layercontains the user's changes. For example, a company has 500 computers.These computers all have the same base software installed, which may beonly the OS. The company then has layers defined for different types ofusers, for example secretaries, engineers and accountants. Thesecretarial layer contains word processing, spreadsheet, and othersecretarial applications. The engineering layer contains softwaredevelopment tools, CAD tools, and other engineering relatedapplications. The accounting layer includes accounting software. Inaddition, each user may have a personal layer, which contains anindividual's changes on top of the type layer and base system.

[0080] If a user causes his computer to fail, an administrator canrestore the computer by disabling the user's personal layer. If acomputer is to be transferred from engineering to accounting, theadministrator removes the engineering type layer and installs theaccounting type layer. Using the above exemplified heirarchical layerorganization can simplify the administration of a large number ofworkstations in a company or other organization.

[0081] Other Uses

[0082] Another use for a layering system is to have layers thatrepresent different environments on a system. For example, a user couldhave an Office and a Gaming layer, each providing an environment withit's own icons and menus.

[0083] In another use, multiple versions of a software product areinstalled on a computer, each isolated in a layer. A user may enable aparticular layer and use the corresponding version of the softwareproduct without having to de-install and re-install the application.This use may be especially helpful where an older version of a softwareproduct supports a function desired but not supported in a newerversion, for example, the importation of older word processing fileformats. This use would also be useful to software product testers, whoin the course of testing verify software functionality against multipledevelopment versions. In that use the repeated unstalling andreinstalling or cleaning and reinstalling operations are avoided.

[0084] Example Implementation

[0085] Example systems are provided of an application layering systemunder a 32-bit Microsoft Windows architecture, such as Windows 95, 98,NT, 2000, and XP. In those system a layering system is formed by addingseveral files to the stock Windows operating system, those filesincluding a runtime library FSLLIB32.DLL, a compression/archivinglibrary, and an FSLX driver which is either an FSLX.VXD driver (for95/98/ME based platforms) or an FSLX.SYS driver (for NT basedplatforms). The addition of those files is performed using aninstallation program. The example layering system provides a user withthe ability to contain third party application installations into a“file system layer” or FSL. The example system provides the modes of“capture”, “capture by PID”, “delete capture”, and “delete capture PID”.

[0086] Depicted in FIG. 3 are components of the example layeringcomputer system. An operating system 314 is installed to a computingdevice, that operating system having subsystems for handling a registry316 and a file system 318. An FSL system driver is installed “on top” ofthe operating system 314 in order to have first processing priority forregistry and file system accesses. An FSL management application 300provides an administrator an interface to interact with the FSL systemdriver 312, change its configuration, and make changes to layers. An FSLAPI library 306 provides a convenient interface for the managementapplication 300 to attach to the FSL system driver 312. At certaintimes, FSL management application 300 provides notices to the WindowsExplorer 302 notifying that application that the contents of a mountedfile system have changed. Other applications 304 may interact with thesystem, performing read and write operations to the file system andregistry, through the FSL system driver 304. A compression library 310may be provided to compress layer information, especially for layerarchives exported by the system.

[0087] A “lazy thread” is utilized to perform low priority tasks. Thatthread wakes up occasionally to delete layers that are marked fordeletion and write out delete lists that have changed. The execution ofthe lazy thread may be deferred for a short time if the system is busy.

[0088] In the example systems there is a key in the registry underHKEY_LOCAL_MACHINE\SYSTEM called FSLogic\FSL where registry settingsdescribe each layer and its settings. The SYSTEM portion of the registryis used because it is available very early in the boot cycle. Each layerhas the properties outlined in the following table: Property/ValueMeaning/Function Active Non-zero indicates that the layer is enabledActiveOnStart Non-zero indicates the layer should be enabled when theFSLX driver loads. FileRedirect The path to the location in the filesystem that contains the file system virtual files. MajorVersion Themajor version of the layer format. MinorVersion The minor version of thelayer format. Peer The name of the peer layer. ReadOnly Non-zeroindicates that the layer is read only, or the readable portion of a peerlayer combination. RegRedirect Path to the location that contains thevirtual registry settings for the layer. Type Layer type. ShouldDeleteNon-zero value indicates that the layer should be deleted. This value isread by the lazy thread to know if the layer should be deleted.

[0089] Also under HKEY_LOCAL_MACHINE\SYSTEM under a key called fslrdr iskept all registry information contained in each layer. Under fslrdrthere is further a key for each layer defined in the system. Under eachlayer key each of the HCC, HCR, HCU, HLM, and HU keys are present. Thesekeys correspond to HKEY_CURRENT_CONFIG, HKEY_CLASSES_ROOT,HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE, and HKEY_USERS respectively. Thestructure of the registry under these keys mimics the regular structureof the system registry.

[0090] When a layer is active, all of the keys and values for the layerare overlaid on the normal registry. For example, a layer “TEST” isdefined on a system and has a registry entry“HKEY_LOCAL_MACHINE\SYSTEM\fslrdr\TEST\HLM\Software\XYZCorp”. When thatlayer becomes active, the following key would appear in the registry:“HKEY_LOCAL_MACHINE\Software\XYZCorp”.

[0091] The FSLX.SYS and its counterpart FSLX.VXD operate to interceptkey file system and registry calls and manipulate the results to createthe appearance that virtual files and registry settings contained in thelayer definitions exist in the real file system and real registry. Whenrequests come that access virtual files or virtual registry settings,these requests are redirected by the FSLX driver to the proper locationsin the layer. The FSLX driver also accepts IOCTLs from FSLLIB32.DLL thatcontrol the state of the driver. The following table outlines a set ofIOCTL commands available through the FSLX driver: IOCTL DescriptionVersion Query Returns the driver version. Begin Capture Causes thedriver to enter “Capture” mode. End Capture Causes the driver to exit“Capture” mode. Begin Delete Capture Causes the driver to enter “DeleteCapture” mode. End Delete Capture Causes the driver to exit “DeleteCapture” mode. Activate Layer Activates a specified layer. DeactivateLayer Deactivates a specified layer. Rename Layer Notifies the driverthat a layer has been renamed.

[0092] For each read or write request to a file system or registry, anowner layer is determined. The owner layer is determined by a sequenceof steps. First, if the driver is in Capture mode, the owner layer isthe layer being captured. Second, if the driver is in PID Capture mode,and if the PID of the requesting process is the PID being captured or achild PID of the PID being captured, the owner layer is the layer beingcaptured. Lastly, if the driver is not in capture mode, and if the PIDof the requesting process is a PID of an executable whose executablefile is in a layer, the owner layer is the layer where the executablefile resides.

[0093] Because multiple layers can be active at the same time and thoselayers may contain entries that overlap, rules are defined to determinethe order layers are considered by the driver. Different modes requiredifferent search rules. If the system is in capture mode, the ownerlayer is defined to be the layer specified as the capture layer.Otherwise, the owner layer is defined to be the layer that a particularprocess started from, as may be determined by traversing upward the PIDparent/child chain. For example, suppose layer A contained B.EXE. WhenB.EXE executes, it results in process C running. The owner layer forprocess C is then layer A.

[0094] When the FSLX driver loads, the following is performed: (1) allmutexes and lists are initialized, (2) a device is created used for APIDLL communications, (3) a symbolic link that allows for the deviceobject's access from Win32 programs is made, (4) all of the file systementry points are hooked in, (5) the drives to be redirected (C:, D:,etc.) are hooked in, (6) all of the Registry entry points are hooked in,(7) the lazy thread is started.

[0095] The FSLX driver uses the following structures and hooks thefollowing entry points in the file system and Registry system code:

[0096] Structures Used:

[0097] FSLX_DELETE_ENTRY_REMOVE: Holds information about an entry on adelete list that may be removed later, for which all necessaryinformation will not be available at the time of removal.

[0098] FSLXDELETIONCANDIDATE: Holds information about a file that shouldbe later marked as deleted.

[0099] PFSLXOPENREGHANDLE: Holds information about all currently openregistry handles.

[0100] FSLX_PFO_ENTRY: Holds information about an open directory, theinformation including a pointer to the file object, a handle to thedirectory, and the directory path.

[0101] FSLX_RENAME_ENTRY: Holds information about a rename operationthat is used to create a delete entry.

[0102] FSLXREGOPENKEY: Holds information about an open key in a layer,including a handle to the key.

[0103] SH_RET_ENTRY: Holds the name of a file. These file names may havealready been returned in a query routine. This structure is retained toensure the same name is not returned more than once if the same fileexists in multiple redirection areas.

[0104] FSLXSHADOWHANDLE: Holds information about an open directoryhandle. Among other things, it may contain a list of FSLX_PFO_ENTRYsthat correspond to directories in applicable layers.

[0105] FSLXSHADOWKEY: Holds information about an open registry key.Among other things, it may contain a list of FSLXREGOPENKEY structuresthat correspond to keys in applicable layers.

[0106] File System Calls:

[0107] IRP_MJ_CLEANUP: If there is an FSLX_DELETE_ENTRY_REMOVE structureassociated with the parameter referenced File Object, free it. If thereis an FSLXDELETIONCANDIDATE structure associated with the parameterreferenced file object, add a delete entry for the file and free thestructure.

[0108] IRP_MJ_CLOSE: Free the FSLXSHADOWHANDLE structure associated withthe parameter referenced File Object by: (1) removing the shadowHandlefrom the list, (2) getting a pointer to the shadowhandle using the FileObject, (3) decrement the reference count of the shadowHandle, (4) ifthe reference count is greater than zero, return success, otherwise (5)free the originalPath member of the shadowHandle, (6) for eachFSLX_PFO_ENTRY: remove the entry from the list, free the file path,dereference the File Object, close the directory handle, and free theFSLX_PFO_ENTRY structure, (7) for each SH_RET_ENTRY: remove the entryfrom the list and free the name and structure, (8) free the searchstring, and (9) free the structure.

[0109] IRP_MJ_CREATE: Get the full file name and full parent directorypath for the request. Determine if the File Object represents a file ora directory. If the File Object represents a directory, determine if itrepresents the root directory. Check to see if this is a reentrant callfor which the SL_OPEN_TARGET_DIRECTORY bit in currentlrpStack->Flagsshould be set. If this is a reentrant create, get the shadowHandleobject for this File Object, increment the reference count on theshadowHandle if there is one, and return. Determine the owner layer. Ifthe path of the file being opened is in a redirected area, and if thefile that is being created is on the delete list, create and fill in anFSLX_DELETE_ENTRY_REMOVE structure and return. The completion routinefor that operation checks to see if the create was successful and, ifso, removes the delete entry from the delete list. Check to see if thecreate is for a *.Config or a *.Manifest file. If it is, set a flag, forwhich at the completion of this routine if the return code isSTATUS_OBJECT_PATH_NOT_FOUND the return code is changed toSTATUS_OBJECT_NAME_NOT_FOUND. If the request is for a directory, do (1)if a shadowHandle already exists for the parameter referenced FileObject, increment it's reference count, (2) if a shadowHandle does notexist, create one with all entries initialized to default values, andfor each layer that contains a corresponding directory or delete entriesthat correspond to the directory, create an FSLX_PFO_ENTRY entry.Determine if the parameter referenced request should be redirected: (1)if the request is a write request and capture mode is enabled, do (a)make sure the parent directory is in the layer being captured, (b) ifthe parameter referenced request is to a file and if a delete entryexists for the file, create an FSLX_DELETE_ENTRY_REMOVE structure sothat the delete entry can be removed if this operation is successful,(c) if the parameter referenced request is to a file and if a deleteentry does not exist for the file, use the standard search order tolocate and copy any existing file to the writable portion of the layerbeing captured, and (d) redirect the create to the writable portion ofthe layer being captured and return; (2) if no layers have the directoryand it is an open (not a create), don't redirect and return from thefunction call; (3) if there is no owner layer, do: (a) if the request isa write request, don't redirect and return from the function call, (b)if the request is a read request, find a first file by iterating througheach layer in the search path, and redirect to that file unless the fileis on a delete list; (4) if an owner layer can be identified, and if therequest is a write request: (a) make sure the directory path exists inthe writable section of the owner layer, (b) if the parameter referencedrequest is to a file, and if a delete entry exists for the file, createan FSLX_DELETE_ENTRY_REMOVE structure so that the delete entry can beremoved upon function call completion, (c) if the parameter referencedrequest is to a file, and if no delete entry exists for the file, usethe standard search order to locate and copy any existing file to thewritable portion of the layer being captured, and (d) redirect thewritable portion of the layer being captured and return; and (5) if anowner layer can be identified, and if the request is a read request,find a first file by iterating through each layer in the search path,and redirect to that file unless the file is on a delete list. If thefile that is being opened is on the delete list, returnSTATUS_OBJECT_NAME_NOT_FOUND. If the open is being performed with theFILE_DELETE_ON_CLOSE flag, and if the parameter referenced file is afile that should be protected from delete, (1) clear theFILE_DELETE_ON_CLOSE flag, and (2) create an FSLXDELETIONCANDIDATEstructure, later used in the completion routine to add a delete entryfor the file. Return a value that indicates success or failure.

[0110] IRP_MJ_CREATE: (completion routine) If the create operation isbeing canceled, free the shadowHandle if one exists, free any existingFSLXDELETIONCANDIDATE and return. If the create operation failed, freeany existing shadowHandle and FSLXDELETIONCANDIDATE and return. If anFSLX_DELETE_ENTRY_REMOVE exists, use it to remove the delete entry fromthe delete list.

[0111] IRP_MJ_DIRECTORY_CONTROL: If the minor function code isIRP_MN_QUERY_DIRECTORY, (1) get the shadowHandle for the File Object,(2) if there is no shadowHandle, return, (3) if the root directory isbeing enumerated, do not return “.” or “..” entries, (4) enumerate thecorresponding directories in each layer and the real directory. UseSH_RET_ENTRY structures to make sure duplicate entries are not returned.

[0112] IRP_MJ_SET_INFORMATION: If the FileInformationClass isFileDispositionInformation, if the file is being deleted, and if it is afile that should be protected from deletion, create anFSLXDELETIONCANDIDATE structure to be used in the completion routine toadd a delete entry for the referenced file. Otherwise, ifFileInformationClass is FileRenameInformation, do the following: (1) ifthe requested operation is a rename operation on a protected file thatshould succeed, copy the source file to the writable section of theowner layer and create a delete list entry for the source file, (2) ifthe requested operation is a rename operation on an unprotected file,perform the rename operation and create an FSLX_RENAME_ENTRY entry forthe source file.

[0113] IRP_MJ_SET_INFORMATION: (completion routine) IfFileInformationClass is FileRenameInformation, and if there is anFSLX_RENAME_ENTRY, use the contained information to create a deleteentry for the source file of the rename operation. IfFileInformationClass is FileDispositionInformation, do: (1) if theoperation was successful and the file was deleted, get theFSLXDELETIONCANDIDATE structure, and if the deleted file was not in thewritable section of the owner layer, cancel the deletion, (2) if theoperation was successful and the delete operation was canceled, removeany existing FSLXDELETIONCANDIDATE, or (3) if the operation wasunsuccessful, and if a deletion was being attempted, remove any existingFSLXDELETIONCANDIDATE.

[0114] Registry Calls:

[0115] RegCloseKey: If this call is re-entrant, pass the call parametersto the OS. Since all NtClose calls come through this hook and not justRegCloseKey calls, make sure that this call is a close for a registryhandle. If not, pass the call parameters to the OS. Get the shadowKeystructure. If there exists a shadowkey, (1) free the shadowkey and allFSLXREGOPENKEY structures by closing the handle to the key and freeingthe structure, and (2) if the main key handle has not been closed, closeit. If there is no shadowkey, close the handle. Remove anyPFSLXOPENREGHANDLE.

[0116] RegCreateKey: If this call is re-entrant, pass the callparameters to the OS. If requesting in a redirected part of theregistry, pass the call parameters to the OS. Get the PID of the caller.If there is a delete entry corresponding to the requested createoperation, (1) create a new key in the writable section of the ownerlayer, (2) if unable to create the key, return an error, (3) change thedisposition to REG_CREATED_NEW_KEY, (4) create a new shadowkey structurefor the created key, (5) determine the owner layer for the key, (6) ifthere is an owner layer (a) allocate a new FSLXSHADOWKEY structure andinitialize with default values and (b) create an FSLXREGOPENKEY entriesfor applicable layers, (7) if the key does not exist in the baseregistry, but does in one or more layers, create a user mode handle tobe returned to the calling application, and (8) remove the delete entry.Otherwise if there is no delete entry corresponding to the requestedcreate operation, continue. Create a shadowKey structure. Determine theowner layer for the key. If there is an owner layer (1) allocate a newFSLXSHADOWKEY structure and initialize with default values, and (2)create FSLXREGOPENKEY entries for applicable layers. If the key does notexist in the base registry but it does in one or more layers, create auser mode handle to be returned to the calling application. If the keycan be opened (not created), set the disposition toREG_OPENED_EXISTING_KEY, create a new PFSLXOPENREGHANDLE and return. Ifcreation of a key in the writable section of an owner layer issuccessful, do: (1) set the disposition to REG_CREATED_NEW_KEY, (2)create a PFSLXOPENREGHANDLE, and (3) return. If the error code from thecreation attempt was STATUS_OBJECT_PATH_NOT_FOUND, returnSTATUS_OBJECT_PATH_NOT_FOUND. If a key was not created in the writablesection of an owner layer, attempt to create the key in the baseregistry; create a PFSLXOPENREGHANDLE, and return.

[0117] RegDeleteKey: If this call is re-entrant, pass the callparameters to the OS. Otherwise, if there is an owner layer, do: (1) ifthe key has child keys, return STATUS_ACCESS_DENIED, or (2) if the keyhas no child keys, create a delete entry for the key. If there is noowner layer, do: (1) if there is a shadowkey, delete the key from thebase registry and add delete entries to all layers, or (2) if there isno shadowKey, delete the key from the base registry.

[0118] RegDeleteValueKey: If this call is re-entrant, pass the callparameters to the OS. Otherwise, if there is an owner layer, create adelete entry for the value. If there is no owner layer, delete the valuefrom the real registry and create delete entries for all applicablelayers.

[0119] RegEnumerateKey: If this call is re-entrant, pass the callparameters to the OS. Otherwise, if there is a shadowKey, (1) enumeratethrough the read registry and applicable layers, (2) store stateinformation in the shadowKey. Do not return duplicate entries. If thereis no shadowKey, pass the call parameters to the OS.

[0120] RegEnumerateValueKey: If this call is re-entrant, pass the callparameters to the OS. Otherwise, if there is a shadowKey, (1) enumeratethrough the read registry and applicable layers, (2) store stateinformation in the shadowkey. Do not return duplicate entries. If thereis no shadowkey, pass the call parameters to the OS.

[0121] RegFlushKey: If this call is re-entrant, pass the call parametersto the OS. If there is a shadowkey, flush the real registry key and allapplicable layer keys. Otherwise, pass the call parameters to the OS.

[0122] RegOpenKey: If this call is re-entrant, or if the key is in theredirection area of the registry, pass the call parameters to the OS.Otherwise, get the caller's PID. If there is a delete entry for thisopen, return STATUS_OBJECT_NAME_NOT_FOUND. Create a shadowKey. Try toidentify an owner layer. If an owner layer can be identified, (1)allocate a new FSLXSHADOWKEY structure initialized with default values,(2) create FSLXREGOPENKEY entries for applicable layers, and if a keydoes not exist in the base registry but it does in one or more layers,create a user mode handle to be returned to the calling application. Ifthe open operation was successful, create a PFSLXOPENREGHANDLE.

[0123] RegQueryKey: If this call is re-entrant, pass the call parametersto the OS. If there is no shadowkey and-the request is of class“KeyNameInformation”, get the key name and if it is the name of aredirect key, change it to the base name. If there is a shadowkey andthere is a delete entry found for this key, returnSTATUS_OBJECT_NAME_NOT_FOUND. If there is a shadowkey and there is not adelete entry for this key, query the real registry key and allapplicable layer keys. Depending on the class of query, combine theresults and return them to the user.

[0124] RegQueryValueKey: If this call is re-entrant, or if there is noshadowkey, pass the call parameters to the OS. If there is a deleteentry for this value, return STATUS_OBJECT_NAME_NOT_FOUND. Otherwise, ifthere is a shadow key, use the standard search order to find the valueto return.

[0125] RegSetValueKey: If this call is re-entrant, or if there is noowner layer, pass the call parameters to the OS. Otherwise, set thevalue in the writable portion of the owner layer. If the settingoperation was successful, remove any delete entry for the value andreturn.

[0126] In the example systems the FSLLIB32.DLL runtime library providesan API that may be used by other applications to manage the layeredsystem and communicate with the FSLX driver, and further provides systemmanagement function implementations. That library includes functions toload and unload the FSLX driver, identify version information for itselfand FSLX driver; begin and end Capture mode; begin and end DeleteCapture mode; import and export layers; create, delete, rename and mergelayers; activate and deactivate layers; get layer information; enumeratelayers; enumerate the files of a layer; enumerate the registry entriesof a layer; manipulate the registry entries of a layer; enable anddisable layers; set and unset an “active on start” layer property,create and delete layer groups; enumerate layer groups; add and removelayers from layer groups; verify system integrity; enumerate layervariables; create and delete layer variables; and delete the writableportion of a layer and create a new, empty writable portion. Adiscussion of the individual exported functions follows with greaterspecificity, using C language prototypes: Function DescriptionFSLActivate( Validates the fslName against defined layers. Ifcorresponding PTCHAR fslName) layer or group is defined, getinformation. If fslName corresponds to a group, recursively callFSLActivate for each layer in the group. Communicates with FSLX drivervia an IOCTL to active the layer. Notifies the Windows Explorer thatclasses may have changed. For each virtual directory contained in thenewly activated layer, notify the Windows Explorer that the directorycontents have changed. Applications in the layer that are specified tobe run on system startup (in win.ini, registry, startup folder, etc.)are started. Return a value indicating success or failure.FSLAddLayerToGroup( Verifies that both the specified layer and group aredefined. PTCHAR fslName, Creates a subkey under the group key with thename of the PTCHAR groupName) layer, adding the layer to the group.Return a value indicating success or failure. FSLAddVariable( Verifiesthe specified layer is defined. Open the variables key PTCHAR fslName,for the specified layer. Set a registry value using the provided PTCHARvarName, varName and varValue. Return a value indicating success orPTCHAR varValue) failure. FSLCreate( Verifies the specified layer is notdefined. Create a layer PTCHAR fslName, definition with default values.Create the layer redirection area BOOL createPeer) in the filesystem(s). If createPeer is true, recursively call FSLCreate for thepeer with createPeer set to FALSE, and set the peer entries in thelayers to point to each other. Return a value indicating success orfailure. FSLCreateGroup( Validates groupName. If the group alreadyexists, return an PTCHAR groupName) error. Create a new group namedgroupName under the group key HKEY_LOCAL_MACHINE\SYSTEM\FSLogic\g roups)Return a value indicating success or failure. FSLDeactivate( ValidatefslName, and get information about the corresponding PTCHAR fslName,layer or group. If fslName corresponds to a group, recursively BOOLforce, call FSLDeactivate for each layer of the group. If fslName PDWORDpPid) corresponds to a layer, communicate with the FSLX driver throughan IOCTL to deactivate the layer. If the FSLX driver returns an errorthat there is a PID running from this layer and force is true, kill thePID corresponding to pPid. Return a value indicating success or failure.FSLDelete( Validates fslName. If the corresponding layer does not exist,PTCHAR fslName, or if the corresponding layer has not been deactivated,return BOOL deletePeer, an error. If deletePeer is TRUE, recursivelycall FSLDelete BOOL force, with the name of the peer layer, withdeletePeer set to FALSE. PDWORD pPid) Mark the layer as deleted. Removethe fslrdr registry branch for the corresponding layer. Remove the layerfrom any group entries. Return a value indicating success or failure.FSLDeleteGroup( Validates groupName. Deletes the group key and anyPTCHAR groupName) subkeys or values. Return a value indicating successor failure. FSLDeletePeer( Validates fslName. Finds the peer forfslName. Calls PTCHAR fslName, FSLDelete using the found peer name.Return a value BOOL force, indicating success or failure. PDWORD pPid)FSLDeleteVariable( Validates fslName. Delete any variable/value pairfrom the PTCHAR fslName, layer's variables key. Return a valueindicating success or PTCHAR varName) failure. FSLEnable( ValidatefslName, and get information about the corresponding PTCHAR fslName,layer or group. If fslName corresponds to a group, recursively BOOLbEnable) call FSLEnable using the same bEnable for each layer of thegroup. If fslName corresponds to a layer, set the enabled value of thecorresponding layer based on bEnable. Return a value indicating successor failure. FSLEndCapture( Validate fslName. Communicates with FSLXdriver through an PTCHAR fslName) IOCTL call to cause the driver to exitcapture mode. Notifies Windows Explorer that classes may have changed.For each directory contained in the newly activated layer, WindowsExplorer is notified that the directory contents have changed. Return avalue indicating success or failure. FSLExport( Validate fslName, andget information about the corresponding PTCHAR fslName, layer or group.If bInitialCall is TRUE, perform a number of PTCHAR archivePath,initialization steps including (1) validating the archivePath, (2) BOOLreplaceIfExists, testing for the existence of an archive file in thearchivePath PTCHAR errorStr, directory, (3) if the replaceIfExists flagis FALSE, returning an void (_stdcall error if an archive file alreadyexists in the archivePath *RTInfoFunc)(PFSL_IMP_EXP directory, (4) ifthe replaceIfExists flag is TRUE, deleting an plmpexp), archive filelocated in the archivePath directory, (5) if fslName BOOL bInitialCall)corresponds to a layer having a peer layer, recursively callingFSLExport once for both the corresponding layer and the peer layer withbInitialCall set to FALSE, followed by closing the archive file.Otherwise, if fslName corresponds to a layer group, perform a number ofsteps including (1) for each layer of the group, recursively callingFSLExport for each layer and any existing peer layer to each layer withbInitialCall set to FALSE, (2) storing the group name in the archive,(3) placing a version number in the archive, and (4) closing the archivefile. If bInitialCall is FALSE and fslName corresponds to a layer,perform the steps of (1) creating a new archive file if it has not yetbeen created, (2) opening the archive file, (3) exporting the fslrdrportion of the registry of the layer to a new file, (4) exporting thelayer definition in the system registry to a new file, (5) creating afile designating the name of the layer, (6) adding all of the createdfiles in the previous three steps plus the files in the redirection areaof the file systems of the layer to the archive, (7) placing a versionnumber in the archive, (8) closing the archive file, and (9) removingthe exported registry files and layer name designation file. Return avalue indicating success or failure. FSLFindClose( Call FindClose (ofthe WIN32 API) using hFindFile. Return a HANDLE hFindFile) valueindicating success or failure. FSLFindCloseGroup( Close the registry keyin groupFind. Return a value indicating PFSL_FIND *groupFind) success orfailure. FSLFindCloseLayer( Close the registry key in fslFind. Return avalue indicating PFSL_FIND *fslFind) success or failure.FSLFindCloseLayerInGroup( Close the registry key in fslFind. Return avalue indicating PFSL_FIND *fslFind) success or failure.FSLFindCloseVariable( Close the registry key in find. Return a valueindicating PFSL_FIND *find) success or failure. FSLFindFirstFile(Validate fslName. Generate a search string including the LPCTSTRfslName, redirection area of the layer and IpFileName. CallFindFirstFile LPCTSTR IpFileName, (WIN32 API) on the redirect searchstring. Return a value LPWIN32_FIND_DATA indicating success or failure.IpFindFileData) FSLFindFirstGroup( Open the parent key in the registrywhere all group names are PFSL_FIND *groupFind stored(HKEY_LOCAL_MACHINE\SYSTEM\FSLogic\groups). PTCHAR groupName) Set theindex in groupFind to 0. Find the first group name. Return a valueindicating success or failure. FSLFindFirstLayer( OpenHKEY_LOCAL_MACHINE\SYSTEM\FSLogic\fsl. Store PFSL_FIND *fslFind thehandle to the key in the fslFind structure. Set the index in PTCHARfslName, the fslFind structure to 0. Set includePeers in the fslFindBOOL includePeers) structure to the value of includePeers. Get the firstlayer name from the registry (layer names are subkeys ofHKEY_LOCAL_MACHINE\SYSTEM\FSLogic\FSL). If a layer is marked fordeletion, go to the next layer. Skip peer layers if includePeers isFALSE. Return a value indicating success or failure.FSLFindFirstLayerInGroup( Open the group registry key under PFSL_FIND*fslFind HKEY_LOCAL_MACHINE\SYSTEM\FSLogic\g roups. Set the PTCHARgroupName, index in fslFind to 0. Get the first layer name from theregistry. PTCHAR fslName) Return a value indicating success or failure.FSLFindFirstVariable( Open the variables registry key under the layerdefinition key. PFSL_FIND *find Set the index in find to 0. Find thefirst value (is this a var PTCHAR varName) name or var value?). Return avalue indicating success or failure. FSLFindNextFile( Call FindNextFile(WIN32 API). Return a value indicating HANDLE hFindFile, success orfailure. LPWIN32_FIND_DATA IpFindFileData) FSLFindNextGroup( Incrementthe index in groupFind. Read the next group name PFSL_FIND *groupFindfrom the registry. Return a value indicating success or failure.PTCHAR_groupName) FSLFindNextLayer( Increment the index in the fslFindstructure. Read the next PFSL_FIND *fslFind, layer name from theregistry. Skip layers marked for deletion. PTCHAR fslName) If theincludePeers field in fslFind is FALSE, skip peer layers. Return a valueindicating success or failure. FSLFindNextLayerInGroup( Increment theindex in fslFind. Read the next layer name from PFSL_FIND *fslFind thegroup key. Return a value indicating success or failure. PTCHAR fslName)FSLFindNextVariable( Increment the index in find. Find the next value(is this a var PFSL_FIND *find name or var value?). Return a valueindicating success or PTCHAR varName) failure FSLGetDriverVersion(Communicates to the FSL Driver via an IOCTL call to PDWORD pdMajVersion,determine the FSL driver's major and minor version numbers. PDWORD SetspdMaj Version and pdMinVersion to the major and minorpdMinVersionstruct) version numbers of the FSL driver. Return a valueindicating success or failure. FSLGetInfo( Validate the fslName. Setstructure pointed to by pInfo to PTCHAR fslName, zero. Copy the layername into the structure. If fslName PFSL_INFO *pInfo) corresponds to agroup, (1) set blsGroup in pInfo to TRUE, and (2) look at all the layersin the group and set enabled, active, and activeOnStart flags of thepInfo structure appropriately. Read the active, enabled, activeOnStart,majorVersion, minorVersion, type, and peerName values from the registryand set the corresponding flags of the pInfo structure. Return a valueindicating success or failure. FSLGetVersion( Sets pdMajVersion andpdMinVersion to the major and minor PDWORD pdMaj Version, versionnumbers of the FSLX driver. Return a value indicating PDWORD success orfailure. pdMinVersionstruct) FSLGetVariable( Read the value named byvarName from the specified layer's PTCHAR fslName, variables key intovarValue. Return a value indicating success PTCHAR varName, or failure.PTCHAR varValue) FSLImport( Verify the archivepath (the archivepathbeing the full pathname PTCHAR archivePath, to the file). Open thearchive file. Check the version numbers BOOL replaceIfExists, againstwhat is supported by the FSLX driver (i.e. driver PTCHAR errorStr,version number > archive version number), returning an error void(_stdcall if unsupported. Extract the files that contain the layer and*RTInfoFunc)(PFSL_IMP_EXP group names. Create each group. For each layerto be pImpexp)) imported, perform the following: (1) if a layer of thesame name already exists and if replaceIfExists is FALSE return anerror, otherwise delete the existing layer, (2) extract all pertinentinformation for the layer from the archive, (3) delete the file thatindicates the layer name, (4) import the registry fslrdr branch for thelayer, (5) import the layer definition, (5) mark the layer as enabled,and (6) delete the layer registry information files. Close the archive.Return a value indicating success or failure. FSLInitSystem(void) Verifythe FSL system: (1) make sure HKEY_LOCAL_MACHINE\SYSTEM\FSLogic\FSLexists, (2) make sure major and minor version registry value arecreated, (3) make sure default file system redirection path and registryredirection path registry values are set, (4) make sureHKEY_LOCAL_MACHINE\SYSTEM\fslrdr exists, and (5) make sure C:\fslrdrexists. Read default file system redirection path. Read default registryredirection path. Return a value indicating success or failure.FSLIsGroup(PTCHAR name) Validate the name. Determine if name is a validgroup by attempting to open the group key underHKEY_LOCAL_MACHINE\SYSTEM\FSLogic\groups. Return a value indicatingsuccess or failure. FSLLoadDriver(void) Verify the FSL system: (1) makesure HKEY_LOCAL_MACHINE\SYSTEM\FSLogic\FSL exists, (2) make sure majorand minor version registry value are created, (3) make sure default filesystem redirection path and registry redirection path registry valuesare set, (4) make sure HKEY_LOCAL_MACHINE\SYSTEM\fslrdr exists, and (5)make sure C:\fslrdr exists. Loads the driver if it is not loaded.Notifies Windows Explorer via SHChangeNotify that the C:\fslrdrdirectory has changed. Return a value indicating success or failure.FSLRegCloseKey(HKEY Close the registry key. Return a value indicatingsuccess or hKey) failure. FSLRegCopyKey( Create a new key name under thedestination parent key. If HKEY srcKey, the key already existed underthe destination parent and PTCHAR srcKeyName, overwrite is FALSE, and ifcopying the values and subkeys HKEY destParentKey, from the source wouldoverwrite any values or subkeys in the BOOL overwrite, destinationreturn FALSE. Otherwise, copy the subkeys and BOOL removeAfterCopy)values to the destination. If removeAfterCopy is TRUE, delete theregistry source key with all of its subkeys and values. Return a valueindicating success or failure. FSLRegCopyValue( If the value alreadyexists under destKey and overwrite is HKEY srcKey, false, return anerror. Read the source value and write that LPCTSTR IpValueName, valueto the destination. If removeAfterCopy is TRUE, remove HKEY destKey, thesource value (what about the source key?) Return a value BOOL overwrite,indicating success or failure. BOOL removeAfterCopy) FSLRegCreateKeyEx(Create a registry path to the layer's redirection area using the HKEYhKey, layer's redirect path, its name, ans IpSubKey. Create the keyLPCTSTR IpSubKey, in the redirection area. Return a value indicatingsuccess or DWORD Reserved, failure. LPTSTR IpClass, DWORD dwOptions,REGSAM samDesired, LPSECURITY_ATTRIBUT ES IpSecurity Attributes, PHKEYphkResult, LPDWORD IpdwDisposition) FSLRegDeleteKey( Remove the key andall subkeys and values. Return a value HKEY hKey, indicating success orfailure. LPCTSTR IpSubKey) FSLRegDeleteValue( Delete the specifiedvalue. Return a value indicating success HKEY hKey, or failure. LPCTSTRIpValueName) FSLRegEnumKeyEx( Enumerate the specified key. Return avalue indicating HKEY hKey, success or failure. DWORD dwIndex, LPTSTRIpName, LPDWORD IpcbName, LPDWORD IpReserved, LPTSTR IpClass, LPDWORDIpcbClass, PFILETIME IpftLastWriteTime) FSLRegEnumValue( Enumerate thespecified value. Return a value indicating HKEY hKey, success orfailure. DWORD dwIndex, LPTSTR IpValueName, LPDWORD IpcbValueName,LPDWORD IpReserved, LPDWORD IpType, LPBYTE IpData, LPDWORD IpcbData)FSLRegOpenKeyEx( Create a registry path to the layer's redirect areausing the PTCHAR fslName, layer's redirect path, its name, and IpSubKey.Open the key in HKEY hKey, the redirection area. Return a valueindicating success or LPCTSTR IpSubKey, failure. DWORD ulOptions, REGSAMsamDesired, PHKEY phkResult) FSLRegQueryValueEx( Query the valuespecified. Return a value indicating success HKEY hKey, or failure.LPTSTR IpValueName, LPDWORD IpReserved, LPDWORD IpType, LPBYTE IpData,LPDWORD IpcbData) FSLRegSetValueEx( Set the specified value. Return avalue indicating success or HKEY hKey, failure. LPCTSTR IpValueName,DWORD Reserved, DWORD dwType, CONST BYTE *IpData DWORD cbData)FSLRemoveLayerFromGroup( Verify that the group exists, and that thelayer is a member of PTCHAR fslName, the group. Remove the layer fromthe group by deleting the PTCHAR group) key with the layer's name fromthe group key. Return a value indicating success or failure.FSLResetPeer( Get the peer name for this layer (writable section of thelayer). PTCHAR fslName, Get information about the peer. make sure thepeer is BOOL force, deactivated. Delete the peer. Create the peer. Pointthe layer PDWORD pPid) and the new peer layer at each other by settingtheir peer values in the registry. If the named layer is active,activate the new peer layer. Return a value indicating success orfailure. FSLSetActiveOnStart( Verify the name corresponds to an existinglayer or group. PTCHAR name, Get information about the named layer orgroup. If the name BOOL bActiveOnStart) corresponds to a group,recursively call FSLSetActiveOnStart for each layer in the group.Otherwise, set the activeOnStart value for the layer to bActiveOnStart.Return a value indicating success or failure. FSLSetLayerInfo( Verifythat the name corresponds to a layer. Open the registry PTCHAR name, keythat contains the layer definition. If fileRedirect is PTCHARfileRedirect, specified, set the value of the proper registry value. IfPTCHAR regRedirect, regRedirect is specified do: (1) set the value ofthe proper DWORD *pType registry value, (2) create the specifiedredirect path, (3) create DWORD *pReadOnly, the redirect root keys (HLM,HCU, HU, HCC, and HCR). If PTCHAR peerName) type is specified, set thevalue of the proper registry value. If readOnly is specified, set thevalue of the proper registry value. If peerName is specified, set thevalue of the proper registry value. Return a value indicating success orfailure. FSLStartCapture( Validates fslName to make sure it is a validlayer name (legal PTCHAR fslName, characters, etc.) Communicates to theFSL Driver via an BOOL bTrack, IOCTL to put it into Capture mode.Notifies Windows Explorer DWORD dPid) that classes may have changed. Foreach directory contained in the newly activated layer, Windows Exploreris notified that the directory contents have changes. Applications inthe layer that are specified to be run on system startup are started(there are several places where these can be specified: win.ini,registry, startup folder, etc.) Return a value indicating success orfailure. FSLUnloadDriver(BOOL force) All active layers are deactivated.Unloads the FSLX driver. Notifies Windows Explorer via SHChangeNotifythat the C:\fslrdr directory has changed. Return a value indicatingsuccess or failure. FSLVerifyBaseSystem(void) Make sureHKEY_LOCAL_MACHINE\SYSTEM\FSLogic exists. Put the current major andminor version into majorVersion and minorVersion values. Put the defaultFile System rediredction path in a DefaultFileRedirect value. Put thedefault Registry redirection path in a DefaultRegistryRedirect value.Make sure HKEY_LOCAL_MACHINE\SYSTEM\fslrdr exists. Make sure fslrdrexists at the root of all file systems that will be redirected. Return avalue indicating success or failure.

[0127] Each of the above functions returns a value of the type“FSLLIB32_API DWORD_stdcall” indicating success or failure. In the abovefunctions, the TCHAR variable type changes depending on the compilationoptions. It compiled for Unicode, a TCHAR is a 16 bit entity, otherwiseit is an 8 byte char. A BOOL may be represented by a single bit, but isoften defined to be a word so as to permit efficient word alignmentaccording to the processor architecture. A DWORD is normally a 32-bitinteger. And an LPCTSTR is a long pointer to a constant array of TCHARs.

[0128] In the example systems, on each file system volume (C:, D:, etc.)included in the system there is an fslrdr directory at the root of thevolume. This directory contains file system information for each of thedefined layers. Under the fslrdr directory directories that correspondto each layer are maintained. Under each of those layer directories is adirectory that represents the drive letter. Under each of those letterdirectories the contained directories and file structures mimic theregular structure of the containing drive. When a layer is active all ofthe directories and files defined for the layer are overlaid on thenormal file system. For example, the directory“C:\fslrdr\TEST\c\XYZCorp” is defined under a “TEST” layer. When the“TEST” layer is active, the directory “c:\XYZCorp” appears on the C:drive to all applications running under that layer, and optionally underother layers depending on the implementation details.

[0129] While the present systems and methods have been described andillustrated in conjunction with a number of specific configurations,those skilled in the art will appreciate that variations andmodifications may be made without departing from the principles hereinillustrated, described, and claimed. The present invention, as definedby the appended claims, may be embodied in other specific forms withoutdeparting from its spirit or essential characteristics. Theconfigurations described herein are to be considered in all respects asonly illustrative, and not restrictive. All changes which come withinthe meaning and range of equivalency of the claims are to be embracedwithin their scope.

What is claimed is:
 1. A method of utilizing a layered computingenvironment to create a program product, the method comprising the stepsof: utilizing a computing environment including layered system software,the layered system software being executable to perform at least thefunctions of: (i) receiving from applications a read request for a readoperation to a file system, the read request containing a file referenceappropriate to the file system organization, (ii) a first determiningwhether or not the file reference is maintained in at least one enabledlayer, (iii) if in the first determining a file reference is found notto be maintained in at least one enabled layer, causing the readoperation to execute using the file reference of the read request, (iv)if in the first determining a file reference is found to be maintainedin at least one enabled layer, identifying an owner layer from the setof enabled layers, (v) following the identifying an owner layer,identifying a virtual read reference utilizing information contained inthe layer, (vi) following the identifying a virtual read reference,causing the read operation to execute using the virtual read reference,(vii) receiving from applications a write request for a write operationto a file system, the write request containing a file referenceappropriate to the file system organization, (viii) a second determiningwhether or not the file reference is a reference to a write operation tobe captured in an enabled layer, (ix) if in the second determining afile reference is determined not to be a reference to a write operationto be captured to an enabled layer, causing the write operation toexecute using the file reference of the write request, (x) if in thesecond determining a file reference is determined to be a reference to awrite operation to be captured to an enabled layer, identifying acapture layer, (xi) following the identifying a capture layer, creatinga virtual write reference corresponding to the file reference of thewrite request, (xii) following the creating a virtual write reference,causing the write operation to execute using the virtual writereference, (xiii) receiving management commands through an applicationsprogrammer interface, those management commands including commands tostart and stop a capture operation; entering a capture mode; performingan installation action; ending a capture mode; and exporting thecaptured layer to a portable media format.
 2. A method according toclaim 1, wherein said exporting also exports a layered system softwareinstallation package to the portable media format.
 3. A method accordingto claim 1, wherein the installation action is a software packageinstall.
 4. A method according to claim 3, wherein the capture modecauses all operations to create, modify or delete files to be redirectedinto the capture layer.
 5. A method according to claim 3, wherein thecapture mode is a capture by PID mode.
 6. A method according to claim 1,wherein the installation action is a software package uninstall.
 7. Amethod according to claim 6, wherein the capture mode is a deletecapture mode.
 8. A method according to claim 6, wherein the capture modeis a delete capture by PID mode.
 9. A method according to claim 1,wherein said captured layer is encrypted before storing in the portablemedia format.
 10. A program product containing both a captured layer andcomputer instructions for operating a layered computing environment,comprising: a set of computer readable media comprising at least onemedium upon which is stored a captured layer and computer instructions,said instructions being executable by a computing system to achieve thefunctions of: (i) receiving from applications a read request for a readoperation to a file system, the read request containing a file referenceappropriate to the file system organization; (ii) a first determiningwhether or not the file reference is maintained in at least one enabledlayer; (iii) if in the first determining a file reference is found notto be maintained in at least one enabled layer, causing the readoperation to execute using the file reference of the read request; (iv)if in the first determining a file reference is found to be maintainedin at least one enabled layer, identifying an owner layer from the setof enabled layers; (v) following the identifying an owner layer,identifying a virtual read reference utilizing information contained inthe layer; and (vi) following the identifying a virtual read reference,causing the read operation to execute using the virtual read reference;and a layer captured by utilizing a layered computing environment tocreate a program product.
 11. A program product according to claim 10,wherein: said layer contains encrypted information; and the computerinstructions are further executable to achieve the functions of: (vii)receiving an authentication key or license authorization, and (viii)using the authentication key or license authorization to decryptencrypted information referenced by the virtual read reference.
 12. Aprogram product according to claim 10, wherein the computer instructionsare further executable to achieve the functions of: (vii) receiving fromapplications a write request for a write operation to a file system, thewrite request containing a file reference appropriate to the file systemorganization; (viii) a second determining whether or not the filereference is a reference to a write operation to be captured in anenabled layer; (ix) if in the second determining a file reference isdetermined not to be a reference to a write operation to be captured toan enabled layer, causing the write operation to execute using the filereference of the write request; (x) if in the second determining a filereference is determined to be a reference to a write operation to becaptured to an enabled layer, identifying a capture layer; (xi)following the identifying a capture layer, creating a virtual writereference corresponding to the file reference of the write request; and(xii) following the creating a virtual write reference, causing thewrite operation to execute using the virtual write reference.
 13. Aprogram product according to claim 12, wherein the computer instructionsare further executable to achieve the functions of: (xiii) receivingfrom applications requests to create, delete, and set the value of aregistry setting; (xiv) following receipt of a request to create, deleteor set the value of a registry setting, a determining whether or not theregistry operation of the request is to be captured to an enabled layer;(xv) acting on a request to create a registry setting, and on adetermination that a registry setting is not to be captured to anenabled layer, causing the registry setting operation to execute in thebase system registry location; (xvi) acting on a request to create aregistry setting, and on a determination that a registry setting is tobe captured to an enabled layer, identifying a registry creationdestination layer; (xvii) following said identifying a registry creationdestination layer, causing the registry setting to be created virtuallyin the registry creation destination layer; (xviii) acting on a requestto delete a registry setting, and on a determination that a registrysetting is not to be captured to an enabled layer, causing the registrysetting deletion operation to execute in the base system registrylocation; (xiv) acting on a request to delete a registry setting, and ona determination that a registry setting is to be captured to an enabledlayer, identifying a registry deletion destination layer; (xx) followingsaid identifying a registry deletion destination layer, causing theregistry setting to be deleted virtually in the registry deletiondestination layer; (xxi) acting on a request to set a registry setting,and on a determination that a registry setting is not to be captured toan enabled layer, causing the registry setting operation to execute inthe base system registry location; (xxii) acting on a request to set aregistry setting, and on a determination that a registry setting is tobe captured to an enabled layer, identifying a registry settingdestination layer; and (xxiii) following said identifying a registrysetting destination layer, causing the registry setting to be createdvirtually in the registry setting destination layer.
 14. A programproduct according to claim 13, wherein the computer instructions arefurther executable to achieve the function of: (xiii) receivingmanagement commands through an applications programmer interface.
 15. Aprogram product according to claim 14, wherein the computer instructionsinclude a layer manager application.
 16. A program product according toclaim 10, wherein the computer instructions are further executable toachieve the functions of: (xiii) examining the installed layers for aconfiguration element, that element specifying for each layer whether ornot the layer is to be enabled on system initialization; and (xiv)enabling those layers having configuration elements specifying layerenablement on system initialization.